package com.lu.sys.controller;

import com.lu.common.utils.PageUtils;
import com.lu.sys.controller.dto.SysLogQueryDTO;
import com.lu.sys.service.ILogService;
import io.swagger.annotations.ApiOperation;
import org.omg.CORBA.SystemException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 小鹿
 * @since 2023-04-24
 */
@Controller
@RestController
@RequestMapping("/log")
public class LogController {
    @Autowired
    ILogService logService;

    @ResponseBody
    @GetMapping("/list")
    public PageUtils list(SysLogQueryDTO dto){
        PageUtils pageUtils = logService.listPage(dto);
        return pageUtils;
    }

//    /**
//     * 删除日志
//     *
//     * @param id
//     * @return
//     */
//    @ApiOperation(value = "删除日志")
////    @RequiresPermissions({"log:delete"})
//    @DeleteMapping("/delete/{id}")
//    public ResponseBean delete(@PathVariable Long id) throws SystemException {
//        logService.delete(id);
//        return ResponseBean.success("删除系统日志成功");
//    }
}
